package parser

import (
	"errors"
	"project/schedule/model"
)

func ParseDescend(general *model.General, body *map[string]interface{}) error {
	descend, ok := (*body)["descend"]
	if !ok {
		return errors.New("no descend in body")
	}
	general.Descend = descend.(bool)
	return nil
}
